import request from '@/utils/request';

// 获取地区架构列表--根据登陆的用户
export function getAreaList() {
  let url = process.env.VUE_APP_SERVICE_NAME + 'api/sysRegMapStruct/getDropDownListByUserId';
  return request({
    url: url,
    method: 'get'
  });
}

// 获取报警类型列表
export function getAlertTypeListApi(params) {
  let url = process.env.VUE_APP_SERVICE_NAME + 'api/sysEnumDictionary/getListByPage';
  return request({
    url: url,
    method: 'post',
    data: params
  });
}

// 获取全部报警信息
export function getAlertData(data) {
  return request({
    url: process.env.VUE_APP_BUS_SERVICE_NAME + 'api/ottAlarmInfo/getListByPage',
    method: 'post',
    data: data
  });
}

// 报警报表日/月/年
export function getAlertReportData(data) {
  return request({
    url: process.env.VUE_APP_BUS_SERVICE_NAME + 'api/realtimeinfo/getAlarmReport',
    method: 'post',
    data: data
  });
}

// 获取运输单位下拉
export function getCompanyItems() {
  return request({
    url: process.env.VUE_APP_BUS_SERVICE_NAME + 'api/ottTransportComp/getDropDownList',
    method: 'get'
  });
}

// 获取车辆品牌型号下拉
export function getCategoryAndTypes() {
  return request({
    url: process.env.VUE_APP_BUS_SERVICE_NAME + 'api/ottVehicleBrand/getListByPage',
    method: 'post',
    data: {
      "pageNum": 0,
      "recordNum": 0
    }
  });
}

// 获取运输类型下拉
export function getCarStatus() {
  return request({
    url: process.env.VUE_APP_SERVICE_NAME + 'api/sysEnumDictionary/getListByPage',
    method: 'post',
    data: {
      queryStr: 'ott_vehicle_info.enumTransStatus',
      "pageNum": 1,
      "recordNum": 200
    }
  });
}
